import type { App } from 'vue';
import router from '@/router';
import i18n from '@/locales';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import duration from 'dayjs/plugin/duration';
import { config } from '@/settings/application';
import 'dayjs/locale/zh-cn';
import piniaPlugin from './pinia';

dayjs.locale(config.language);
dayjs.extend(relativeTime);
dayjs.extend(duration);

export default {
  install: (app: App) => {
    app.use(piniaPlugin).use(i18n).use(router);
  },
};
